<?php
/**
 * 注册用户服务到容器
 *
 * @package    Frado\Providers
 * @version    0.1.1
 * @author     Dingwu
 */

namespace App\Providers;

use Frado\Container\Container;
use Frado\Container\ServiceProviderInterface;
use Frado\Auth\AuthIdentify;
use Frado\Web\PagerLink;

class AuthServiceProvider implements ServiceProviderInterface
{

    /**
     * @param Container $app
     */
    public function register(Container $app)
    {

        $app['userAuth'] = function ($app) {
            $auth = new AuthIdentify($app);
            $auth->init();
            return $auth;
        };

        $app['pagelink'] = function ($app) {
            $link = new PagerLink($app);
            $link->init();
            return $link;
        };
    }

}
